package com.clqteam.serviceimpl;

import java.util.List;

import com.clqteam.dao.ShowrNameDao;
import com.clqteam.daoimpl.ShowrNameDaoImpl;
import com.clqteam.model.Employee;
import com.clqteam.model.Role;
import com.clqteam.service.ShowEmployeeService;
import com.clqteam.service.ShowrNameService;

import net.sf.json.JSONObject;


/**
 * 
 * @author CLQ
 *
 */
public class ShowrNameServiceImpl implements ShowrNameService{
   ShowrNameDao rNameDao=new ShowrNameDaoImpl();

@Override
public List<Role> findrNameByEmployee() {
	
	return rNameDao.getrNameByEmployee();
}

@Override
public int swichrIdByrName(String rName) {
	int i=0;
	 List<Role> role=rNameDao.getrNameByEmployee();
	 for (Role ro : role) {
		 if(rName.equals(ro.getrName())){
			 i=ro.getrId();
		 }
	}
	return i;
}





}
